

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">

  <link rel="apple-touch-icon" sizes="76x76" href="/bg/sysu_128.png">
  <link rel="icon" href="/bg/sysu_128.png">
  

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="Haoran Liao">
  <meta name="keywords" content="">
  
    <meta name="description" content="GDB（GNU Debugger）提供了丰富的调试命令，涵盖代码运行、断点管理、变量查看、堆栈分析等多个方面。以下是 GDB 的所有主要调试命令，按类别分类：  1. 启动和退出    命令 说明     gdb program 调试可执行文件 program   gdb --args program arg1 arg2 传递参数给 program">
<meta property="og:type" content="article">
<meta property="og:title" content="gdb常用指令">
<meta property="og:url" content="http://example.com/2025/08/04/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/gdb%E5%B8%B8%E7%94%A8%E6%8C%87%E4%BB%A4/index.html">
<meta property="og:site_name" content="泥土味的博客">
<meta property="og:description" content="GDB（GNU Debugger）提供了丰富的调试命令，涵盖代码运行、断点管理、变量查看、堆栈分析等多个方面。以下是 GDB 的所有主要调试命令，按类别分类：  1. 启动和退出    命令 说明     gdb program 调试可执行文件 program   gdb --args program arg1 arg2 传递参数给 program">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2025-08-03T19:08:28.000Z">
<meta property="article:modified_time" content="2025-08-03T19:19:12.191Z">
<meta property="article:author" content="Haoran Liao">
<meta property="article:tag" content="GDB">
<meta name="twitter:card" content="summary_large_image">
  
  
  
  <title>gdb常用指令 - 泥土味的博客</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/c/font_1749284_5i9bdhy70f8.css">



<link rel="stylesheet" href="//at.alicdn.com/t/c/font_1736178_k526ubmyhba.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.9.8","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"follow_dnt":true,"baidu":null,"google":{"measurement_id":null},"tencent":{"sid":null,"cid":null},"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false},"umami":{"src":null,"website_id":null,"domains":null,"start_time":"2024-01-01T00:00:00.000Z","token":null,"api_server":null}},"search_path":"/local-search.xml","include_content_in_search":true};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  


  
<meta name="generator" content="Hexo 7.3.0"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>泥土味的博客</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/" target="_self">
                
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/publish/" target="_self">
                
                <span>发表</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/" target="_self">
                
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" target="_self" href="javascript:;" role="button"
                 data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                
                <span>分类</span>
              </a>
              <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                
                  
                  
                  
                  <a class="dropdown-item" href="/categories/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" target="_self">
                    
                    <span>学习笔记</span>
                  </a>
                
                  
                  
                  
                  <a class="dropdown-item" href="/categories/%E7%94%9F%E6%B4%BB%E9%9A%8F%E7%AC%94/" target="_self">
                    
                    <span>生活随笔</span>
                  </a>
                
                  
                  
                  
                  <a class="dropdown-item" href="/categories/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/" target="_self">
                    
                    <span>技术分享</span>
                  </a>
                
              </div>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/" target="_self">
                
                <span>关于</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/default.png') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="gdb常用指令"></span>
          
        </div>

        
          
  <div class="mt-3">
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2025-08-04 03:08" pubdate>
          2025年8月4日 凌晨
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          721 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          7 分钟
        
      </span>
    

    
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <h1 id="seo-header">gdb常用指令</h1>
            
            
              <div class="markdown-body">
                
                <p>GDB（GNU
Debugger）提供了丰富的调试命令，涵盖代码运行、断点管理、变量查看、堆栈分析等多个方面。以下是
GDB 的所有主要调试命令，按类别分类：</p>
<hr />
<h2 id="启动和退出">1. <strong>启动和退出</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>gdb program</code></td>
<td>调试可执行文件 <code>program</code></td>
</tr>
<tr>
<td><code>gdb --args program arg1 arg2</code></td>
<td>传递参数给 <code>program</code></td>
</tr>
<tr>
<td><code>gdb -p PID</code></td>
<td>附加到进程 PID</td>
</tr>
<tr>
<td><code>q</code> / <code>quit</code></td>
<td>退出 GDB</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="运行程序">2. <strong>运行程序</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>r</code> / <code>run [args]</code></td>
<td>运行程序，可传递参数</td>
</tr>
<tr>
<td><code>start</code></td>
<td>启动程序并停在 <code>main()</code> 之前</td>
</tr>
<tr>
<td><code>kill</code></td>
<td>终止正在调试的程序</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="断点breakpoints">3. <strong>断点（Breakpoints）</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>b</code> / <code>break func_name</code></td>
<td>在函数 <code>func_name</code> 处设置断点</td>
</tr>
<tr>
<td><code>b line_number</code></td>
<td>在当前源文件的 <code>line_number</code> 处设置断点</td>
</tr>
<tr>
<td><code>b file:line</code></td>
<td>在指定文件 <code>file</code> 的 <code>line</code> 行处设置断点</td>
</tr>
<tr>
<td><code>b *address</code></td>
<td>在内存地址 <code>address</code> 处设置断点</td>
</tr>
<tr>
<td><code>info breakpoints</code></td>
<td>显示所有断点</td>
</tr>
<tr>
<td><code>delete [num]</code></td>
<td>删除编号为 <code>num</code> 的断点（默认删除所有断点）</td>
</tr>
<tr>
<td><code>clear func_name</code></td>
<td>清除函数 <code>func_name</code> 的断点</td>
</tr>
<tr>
<td><code>clear file:line</code></td>
<td>清除 <code>file</code> 文件 <code>line</code> 行的断点</td>
</tr>
<tr>
<td><code>enable [num]</code></td>
<td>启用编号为 <code>num</code> 的断点</td>
</tr>
<tr>
<td><code>disable [num]</code></td>
<td>禁用编号为 <code>num</code> 的断点</td>
</tr>
<tr>
<td><code>condition num expr</code></td>
<td>仅当 <code>expr</code> 为真时，触发编号为 <code>num</code>
的断点</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="观察点watchpoints">4.
<strong>观察点（Watchpoints）</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>watch var</code></td>
<td>监视变量 <code>var</code> 变化时暂停</td>
</tr>
<tr>
<td><code>rwatch var</code></td>
<td>变量 <code>var</code> 被读取时暂停</td>
</tr>
<tr>
<td><code>awatch var</code></td>
<td>变量 <code>var</code> 被读/写时暂停</td>
</tr>
<tr>
<td><code>info watchpoints</code></td>
<td>显示所有监视点</td>
</tr>
<tr>
<td><code>delete watch num</code></td>
<td>删除编号为 <code>num</code> 的监视点</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="单步执行stepping">5. <strong>单步执行（Stepping）</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>s</code> / <code>step</code></td>
<td>单步执行代码（进入函数内部）</td>
</tr>
<tr>
<td><code>n</code> / <code>next</code></td>
<td>单步执行代码（不进入函数内部）</td>
</tr>
<tr>
<td><code>finish</code></td>
<td>运行到当前函数返回</td>
</tr>
<tr>
<td><code>until</code></td>
<td>运行到当前代码块结束</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="继续执行">6. <strong>继续执行</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>c</code> / <code>continue</code></td>
<td>继续执行到下一个断点</td>
</tr>
<tr>
<td><code>jump line</code></td>
<td>跳转到 <code>line</code> 行执行</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="堆栈stack">7. <strong>堆栈（Stack）</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>bt</code> / <code>backtrace</code></td>
<td>显示当前调用栈</td>
</tr>
<tr>
<td><code>bt full</code></td>
<td>显示完整的调用栈（包含参数和变量）</td>
</tr>
<tr>
<td><code>frame num</code></td>
<td>切换到编号 <code>num</code> 的栈帧</td>
</tr>
<tr>
<td><code>up</code></td>
<td>向上移动一层栈帧</td>
</tr>
<tr>
<td><code>down</code></td>
<td>向下移动一层栈帧</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="打印变量">8. <strong>打印变量</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>p</code> / <code>print expr</code></td>
<td>打印表达式 <code>expr</code> 的值</td>
</tr>
<tr>
<td><code>ptype var</code></td>
<td>显示变量 <code>var</code> 的类型</td>
</tr>
<tr>
<td><code>whatis var</code></td>
<td>显示变量 <code>var</code> 的类型</td>
</tr>
<tr>
<td><code>x addr</code></td>
<td>以十六进制格式查看 <code>addr</code> 处的内存</td>
</tr>
<tr>
<td><code>x/4x addr</code></td>
<td>以十六进制显示 <code>addr</code> 处的 4 个单位数据</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="寄存器">9. <strong>寄存器</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>info registers</code></td>
<td>显示所有寄存器的值</td>
</tr>
<tr>
<td><code>p $eax</code></td>
<td>打印寄存器 <code>eax</code> 的值</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="信号signals">10. <strong>信号（Signals）</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>handle SIGSEGV stop</code></td>
<td>在 <code>SIGSEGV</code> 信号触发时暂停</td>
</tr>
<tr>
<td><code>handle SIGINT nostop</code></td>
<td>忽略 <code>SIGINT</code> 信号</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="调试共享库">11. <strong>调试共享库</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>info sharedlibrary</code></td>
<td>显示加载的共享库</td>
</tr>
<tr>
<td><code>set solib-search-path path</code></td>
<td>设置共享库搜索路径</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="修改变量">12. <strong>修改变量</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>set var = value</code></td>
<td>修改变量值</td>
</tr>
<tr>
<td><code>set $eax = 0x1234</code></td>
<td>修改寄存器值</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="附加进程">13. <strong>附加进程</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>attach PID</code></td>
<td>附加到进程 <code>PID</code></td>
</tr>
<tr>
<td><code>detach</code></td>
<td>断开调试进程</td>
</tr>
</tbody>
</table>
<hr />
<h2 id="线程调试">14. <strong>线程调试</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>info threads</code></td>
<td>显示所有线程</td>
</tr>
<tr>
<td><code>thread num</code></td>
<td>切换到 <code>num</code> 号线程</td>
</tr>
<tr>
<td><code>thread apply all cmd</code></td>
<td>对所有线程执行 <code>cmd</code></td>
</tr>
</tbody>
</table>
<hr />
<h2 id="脚本">15. <strong>脚本</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>source file</code></td>
<td>运行 <code>file</code> 中的 GDB 命令</td>
</tr>
<tr>
<td><code>define cmd</code></td>
<td>自定义命令</td>
</tr>
<tr>
<td><code>document cmd</code></td>
<td>添加自定义命令的文档</td>
</tr>
<tr>
<td><code>save breakpoints file</code></td>
<td>将断点信息保存到 <code>file</code></td>
</tr>
</tbody>
</table>
<hr />
<h2 id="gdb-调试-tui-模式">16. <strong>GDB 调试 TUI 模式</strong></h2>
<table>
<thead>
<tr>
<th>命令</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>layout src</code></td>
<td>显示源码窗口</td>
</tr>
<tr>
<td><code>layout asm</code></td>
<td>显示汇编窗口</td>
</tr>
<tr>
<td><code>layout regs</code></td>
<td>显示寄存器窗口</td>
</tr>
<tr>
<td><code>tui enable</code></td>
<td>启用 TUI 模式</td>
</tr>
<tr>
<td><code>tui disable</code></td>
<td>禁用 TUI 模式</td>
</tr>
</tbody>
</table>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/" class="category-chain-item">技术分享</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/GDB/" class="print-no-link">#GDB</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>gdb常用指令</div>
      <div>http://example.com/2025/08/04/技术分享/gdb常用指令/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>Haoran Liao</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2025年8月4日</div>
        </div>
      
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a class="print-no-link" target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-cc-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2025/08/04/%E7%94%9F%E6%B4%BB%E9%9A%8F%E7%AC%94/%E6%91%86%E8%84%B1%E5%BF%99%E7%A2%8C%E7%84%A6%E8%99%91/" title="摆脱忙碌焦虑">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">摆脱忙碌焦虑</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2025/08/04/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/%E9%9A%8F%E6%9C%BA%E8%BF%87%E7%A8%8B/" title="随机过程">
                        <span class="hidden-mobile">随机过程</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  


  
  









    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.4/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.20.1/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/5.0.0/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  
      <script>
        if (!window.MathJax) {
          window.MathJax = {
            tex    : {
              inlineMath: { '[+]': [['$', '$']] }
            },
            loader : {
              load: ['ui/lazy']
            },
            options: {
              renderActions: {
                insertedScript: [200, () => {
                  document.querySelectorAll('mjx-container').forEach(node => {
                    let target = node.parentNode;
                    if (target.nodeName.toLowerCase() === 'li') {
                      target.parentNode.classList.add('has-jax');
                    }
                  });
                }, '', false]
              }
            }
          };
        } else {
          MathJax.startup.document.state(0);
          MathJax.texReset();
          MathJax.typeset();
          MathJax.typesetPromise();
        }

        Fluid.events.registerRefreshCallback(function() {
          if ('MathJax' in window && MathJax.startup.document && typeof MathJax.startup.document.state === 'function') {
            MathJax.startup.document.state(0);
            MathJax.texReset();
            MathJax.typeset();
            MathJax.typesetPromise();
          }
        });
      </script>
    

  <script  src="https://lib.baomitu.com/mathjax/3.2.2/es5/tex-mml-chtml.js" ></script>

  <script  src="/js/local-search.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
